<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<jsp:include page = "../../metadatosPopUp.jsp" flush = "True" />
<html>
    <script>
        function alertaEjemplo() {
            alert("alertaEjemplo");
        }
    </script>
    <head>
        <title>REGISTRO DE EXISENCIAS</title>
    </head>
    <body>
        <div class="wrapper">
            <header class="header">
                <!--  <img src="./resources/Logo.PNG" />-->
            </header><!-- .header-->
            <!-- .Navigation Menu -->
            <main class="content">
                <!-- .content -->
                <c:if test="${banderaCtrlInterfaz==1}">
                    <form method="post" action="./Logistica?action=nuevoEnvio&index=2" class="formee">

                        <input type="hidden" value="<c:out value="${logisticaPrincipal.idPedidoApuntador}"/>" name="idPedido"/>
                        <div class="grid-12-12">
                            <fieldset>
                                <legend>NUEVO REGISTRO DE ENVIO</legend>
                                <c:if test="${logisticaPrincipal.nErrores>0}">
                                    <div class="formee-msg-error">
                                        <h3>Incidencias:</h3>
                                        <ul>
                                            <c:forEach items="${logisticaPrincipal.errores}" var="e">
                                                <li><c:out value="${e}"/></li>
                                                </c:forEach>
                                        </ul>
                                    </div> 
                                </c:if>
                                <div class="grid-12-12">
                                    <label>ENVIA POR <em class="formee-req">*</em></label>
                                    <select name="medioReparto">
                                        <option value="0">SELECCIONE MEDIO DE ENVIO</option>
                                        <option value="1">EQUIPO DE REPARTO</option>
                                        <option value="3">FLETERA</option>
                                    </select>
                                </div>
                                <div class="grid-4-12">
                                    <input type="submit" value="Continuar" />
                                </div>
                            </fieldset>
                        </div>
                    </form>
                </c:if>

                <!-- EQUIPO DE REPARTO DE  LA EMPRESA -->
                <c:if test="${banderaCtrlInterfaz==2}">
                    <form method="post" action="./Logistica?action=nuevoEnvio&index=3" class="formee">
                        <input type="hidden" value="<c:out value="${logisticaPrincipal.idPedidoApuntador}"/>" name="idPedido"/>
                        <div class="grid-12-12">
                            <fieldset>
                                <legend> VEHICULO Y CHOFER</legend>
                                <c:if test="${logisticaPrincipal.nErrores>0}">
                                    <div class="formee-msg-error">
                                        <h3>Incidencias:</h3>
                                        <ul>
                                            <c:forEach items="${logisticaPrincipal.errores}" var="e">
                                                <li><c:out value="${e}"/></li>
                                                </c:forEach>
                                        </ul>
                                    </div> 
                                </c:if>
                                <div class="grid-6-12">
                                    <label>VEHICULO<em class="formee-req">*</em></label>
                                    <select name="vehiculo">
                                        <option value="0">SELECCIONE VEHICULO</option>
                                        <option value="1">RENAULT CANGU</option>
                                        <option value="1">RENAULT CLIO</option>
                                        <option value="2">CAMION</option>
                                        <option value="3">VAN</option>
                                    </select>
                                </div>
                                <div class="grid-6-12">
                                    <label>CONDUCTOR<em class="formee-req">*</em></label>
                                    <select name="conductor">
                                        <option value="0">SELECCIONE CONDUCTOR</option>
                                        <option value="1">JUAN</option>
                                        <option value="2">LUIS</option>
                                        <option value="3">ELEAZAR</option>
                                    </select>
                                </div>
                                <div class="grid-12-12">
                                    <label># FOLIO REMISION/FACTURA<em class="formee-req">*</em></label>
                                    <input type="text" name="folioFiscal" onKeyup="this.value = ventero(this.value)" value="<c:out value="${tarryPrincipal.idPedido}"/>"/>
                                </div>
                                <div class="grid-12-12">
                                    <label>OBSERVACIONES<em class="formee-req">*</em></label>
                                    <textarea rows="" cols="" name="observaciones"></textarea>
                                </div>
                                <div class="grid-4-12">
                                    <input type="submit" value="Continuar" />
                                </div>
                            </fieldset>
                        </div>
                    </form>
                </c:if>
                <!-- REPARTO POR FLETERA -->
                <c:if test="${banderaCtrlInterfaz==3}">
                    <form method="post" action="./Logistica?action=nuevoEnvio&index=4" class="formee">
                        <input type="hidden" value="<c:out value="${logisticaPrincipal.idPedidoApuntador}"/>" name="idPedido"/>
                        <div class="grid-12-12">
                            <fieldset>
                                <legend> ENVIO POR FLETERA</legend>
                                <c:if test="${logisticaPrincipal.nErrores>0}">
                                    <div class="formee-msg-error">
                                        <h3>Incidencias:</h3>
                                        <ul>
                                            <c:forEach items="${logisticaPrincipal.errores}" var="e">
                                                <li><c:out value="${e}"/></li>
                                                </c:forEach>
                                        </ul>
                                    </div> 
                                </c:if>
                                <div class="grid-12-12">
                                    <label>FLETERA/RAZONSOCIAL<em class="formee-req">*</em></label>
                                    <select name="fletera">
                                        <option value="0">SELECCIONE EMPRESA FLETERA</option>
                                        <option value="1">CASTORES</option>
                                        <option value="2">ESTAFETA</option>
                                        <option value="3">8W SINALOA EXPRES</option>
                                        <option value="4">TRES GUERRAS</option>
                                        <option value="5">FEDEX</option>
                                    </select>
                                </div>
                                <div class="grid-6-12">
                                    <label># UNIDAD<em class="formee-req">*</em></label>
                                    <input type="text" name="nUnidad" onKeyup="this.value = ventero(this.value)" value="<c:out value="${tarryPrincipal.idPedido}"/>"/>
                                </div>
                                <div class="grid-6-12">
                                    <label># FOLIO REMISION/FACTURA<em class="formee-req">*</em></label>
                                    <input type="text" name="folioFiscal" onKeyup="this.value = ventero(this.value)" value="<c:out value="${tarryPrincipal.idPedido}"/>"/>
                                </div>
                                <div class="grid-12-12">
                                    <label>OBSERVACIONES<em class="formee-req">*</em></label>
                                    <textarea rows="" cols="" onKeyup="this.value = txtalfanum(this.value)" name="observaciones"></textarea>
                                </div>
                                <div class="grid-4-12">
                                    <input type="submit" value="Continuar" />
                                </div>
                            </fieldset>
                        </div>
                    </form>
                </c:if>

            </main>
        </div>
    </body>
</html>

